Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / app / src / main / java / com / geeksville / mesh / repository / radio / BluetoothInterfaceSpec.kt

Displaying Raw • Download

app/src/main/java/com/geeksville/mesh/repository/radio/BluetoothInterfaceSpec.kt ui_message_list (be3f882f) Text, 1.73 KB

T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

Tff7b72package T7ee787com.geeksville.mesh.repository.radio

Tff7b72import T7ee787com.geeksville.mesh.android.Logging
Tff7b72import T7ee787com.geeksville.mesh.repository.bluetooth.BluetoothRepository
Tff7b72import T7ee787com.geeksville.mesh.util.anonymize
Tff7b72import T7ee787javax.inject.Inject

T8b949e/**
* Bluetooth backend implementation.
*/
Tff7b72class T56d364BluetoothInterfaceSpec Tf0883e@Inject Tff7b72constructorTb4b4b4(
Tff7b72private Tff7b72val Te6edf3factoryTb4b4b4: Te6edf3BluetoothInterfaceFactoryTb4b4b4,
Tff7b72private Tff7b72val Te6edf3bluetoothRepositoryTb4b4b4: Te6edf3BluetoothRepositoryTb4b4b4,
Tb4b4b4) Tb4b4b4: Te6edf3InterfaceSpecTff7b72<Te6edf3BluetoothInterfaceTff7b72>Tb4b4b4, Te6edf3Logging Tb4b4b4{
Tff7b72override Tff7b72fun Td2a8ffcreateInterfaceTb4b4b4(Te6edf3restTb4b4b4: Tffa657StringTb4b4b4)Tb4b4b4: Te6edf3BluetoothInterface Tb4b4b4{
Tff7b72return Te6edf3factoryTb4b4b4.Te6edf3createTb4b4b4(Te6edf3restTb4b4b4)
Tb4b4b4}

T8b949e/** Return true if this address is still acceptable. For BLE that means, still bonded */
Tff7b72override Tff7b72fun Td2a8ffaddressValidTb4b4b4(Te6edf3restTb4b4b4: Tffa657StringTb4b4b4)Tb4b4b4: Tffa657Boolean Tb4b4b4{
Tff7b72val Te6edf3allPaired Tff7b72= Te6edf3bluetoothRepositoryTb4b4b4.Te6edf3stateTb4b4b4.Te6edf3valueTb4b4b4.Te6edf3bondedDevices
Tb4b4b4.Te6edf3map Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3address Tb4b4b4}Tb4b4b4.Te6edf3toSetTb4b4b4(Tb4b4b4)
Tff7b72return Tff7b72if Tb4b4b4(Tff7b72!Te6edf3allPairedTb4b4b4.Te6edf3containsTb4b4b4(Te6edf3restTb4b4b4)Tb4b4b4) Tb4b4b4{
Te6edf3warnTb4b4b4(Ta5d6ff"Ta5d6ffIgnoring stale bond to Tffd700${Te6edf3restTb4b4b4.Te6edf3anonymizeTffd700}Ta5d6ff"Tb4b4b4)
Tff7b72false
Tb4b4b4} Tff7b72else Tb4b4b4{
Tff7b72true
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.2 - Generated in 0.12s